/*
 * @Author: 薛严 348352046@qq.com
 * @Date: 2022-11-01 22:26:01
 * @LastEditors: 薛严 348352046@qq.com
 * @LastEditTime: 2022-11-18 18:09:37
 * @FilePath: /vite-react-template/vite.config.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
// import {  
//   createStyleImportPlugin,
//   AndDesignVueResolve,
//   VantResolve,
//   ElementPlusResolve,
//   NutuiResolve,
//   AntdResolve,} from 'vite-plugin-style-import';
// https://vitejs.dev/config/
export default defineConfig({
  css: {
    preprocessorOptions: {
      less: {
        javascriptEnabled: true,
      },
    },
  },
  plugins: [
    react(),
    // createStyleImportPlugin({
    //   resolves: [
    //     AndDesignVueResolve(),
    //     VantResolve(),
    //     ElementPlusResolve(),
    //     NutuiResolve(),
    //     AntdResolve(),
    //   ],
    //   libs: [
    //     // If you don’t have the resolve you need, you can write it directly in the lib, or you can provide us with PR
    //     // {
    //     //   libraryName: 'ant-design-vue',
    //     //   esModule: true,
    //     //   resolveStyle: (name) => {
    //     //     return `ant-design-vue/es/${name}/style/index`
    //     //   },
    //     // },
    //   ],
    // }),
  ],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src')
    }
  },
 
})
